package org.mayanjun.code.easyweb.demo.controller;

import org.mayanjun.code.easyweb.demo.annotation.EnableTime;
import org.mayanjun.code.easyweb.springmvc.annotation.PrintAccessLog;
import org.mayanjun.code.easyweb.springmvc.view.SmartView;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author bianliang (02/08/2017)
 */
@EnableTime
@RestController
public class TestController {

    @PrintAccessLog
    @RequestMapping(method = RequestMethod.GET)
    public Object activateAndPoll(HttpServletRequest request) throws Throwable {
        return new SmartView("/index");
    }

}
